package br.com.SGF.domain;


import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table(name = "senha")
@NamedQueries({
		@NamedQuery(name = "Senha.listar", query = "SELECT senha FROM SenhaDomain senha"),
		@NamedQuery(name = "Senha.obterCodigo", query = "SELECT senha  FROM SenhaDomain senha where senha.codigo = :codigo") })
public class SenhaDomain{

	
	
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name = "sen_id")
	private int codigo;

	@Column(name="sen_descricao", length=6)
	private String descricao;
	
	@Temporal(TemporalType.TIME)
	@Column (name = "sen_hora_retirada")
	private Date horaRetirada;

	@Temporal(TemporalType.DATE)
	@Column (name = "sen_data")
	private Date dataRetirada;

	public int getCodigo() {
		return codigo;
	}

	public void setCodigo(int codigo) {
		this.codigo = codigo;
	}

	public String getDescricao() {
		return descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public Date getHoraRetirada() {
		return horaRetirada;
	}

	public void setHoraRetirada(Date horaRetirada) {
		this.horaRetirada = horaRetirada;
	}

	public Date getDataRetirada() {
		return dataRetirada;
	}

	public void setDataRetirada(Date dataRetirada) {
		this.dataRetirada = dataRetirada;
	}

	@Override
	public String toString() {
		return "SenhaDomain [codigo=" + codigo + ", descricao=" + descricao
				+ ", horaRetirada=" + horaRetirada + ", dataRetirada="
				+ dataRetirada + "]";
	}

	
}